<?php
/*
Plugin Name: Slidyfy
Plugin URI: http://eresearch.uws.edu.au
Description: Turns HTML with declarative slide markup into a presentation
Author: Peter Sefton
Author URI: http://ptsefton.com
*/



define("SLIDYFY_VERSION", '0.2');
define("SLIDYFY_VERSION", 'http://ersearch.uws.edu.au');
define("SLIDYFY_VERSION_HOSTNAME", 'http://ersearch.uws.edu.au');



function SLIDYFY_wp_print_scripts(){
 global $post, $user_login, $user_identity, $user_email, $user_ID, $current_user, $user_url;
		
			
			$plugin_name = str_replace("/", "", str_replace(basename( __FILE__),"",plugin_basename(__FILE__))); 
			$plugin_url = WP_PLUGIN_URL .'/' . $plugin_name . '/';
			$js_path = $plugin_url. 'js/'; 
			
			print "<script type='text/javascript'>var loadPath='$js_path';</script>";       
		  	
                   	wp_enqueue_script('slidyfy',$js_path.'j5slide_embed.js'); 
				
	
	
}

function SLIDIFY_clean_feed($content) {
	global $wp_query;
	
	if (is_feed()) {
		
		
		$content = str_replace("<object ", "<div ", $content);
		$content = str_replace("</object>", "</div>", $content);
	}
	return $content;
}
add_action('wp_print_scripts', 'SLIDYFY_wp_print_scripts');

add_filter('the_content', 'SLIDIFY_clean_feed');
add_filter('the_excerpt', 'SLIDIFY_clean_feed');



?>